package com.lframework.xingyun.basedata.vo.coupon;

import com.lframework.starter.web.core.components.validation.IsNumberPrecision;
import java.math.BigDecimal;
import javax.validation.constraints.NotBlank;
import com.lframework.starter.web.core.vo.BaseVo;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import com.lframework.starter.web.core.components.validation.TypeMismatch;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.util.List;

import lombok.Data;

@Data
public class CreateCouponVo implements BaseVo, Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 卡券类型
     */
    @ApiModelProperty(value = "卡券类型", required = true)
    @NotNull(message = "请输入卡券类型！")
    @TypeMismatch(message = "卡券类型格式有误！")
    private Integer couponType;

    /**
     * 卡券名称
     */
    @ApiModelProperty(value = "卡券名称", required = true)
    @NotBlank(message = "请输入卡券名称！")
    @Length(message = "卡券名称最多允许20个字符！")
    private String couponName;

    /**
     * 发放方式
     */
    @ApiModelProperty(value = "发放方式", required = true)
    @NotNull(message = "请输入发放方式！")
    @TypeMismatch(message = "发放方式格式有误！")
    private Integer sendWay;

    /**
     * 有效天数
     */
    @ApiModelProperty(value = "有效天数", required = true)
    @NotNull(message = "请输入有效天数！")
    @TypeMismatch(message = "有效天数格式有误！")
    private Integer effectiveDay;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态", required = true)
    @NotNull(message = "请输入状态！")
    @TypeMismatch(message = "状态格式有误！")
    private Boolean available;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注", required = true)
    @NotBlank(message = "请输入备注！")
    @Length(message = "备注最多允许200个字符！")
    private String description;

    /**
     * 面值
     */
    @ApiModelProperty(value = "面值", required = true)
    @NotNull(message = "请输入面值！")
    @TypeMismatch(message = "面值格式有误！")
    @IsNumberPrecision(message = "面值最多允许2位小数！", value = 2)
    private BigDecimal parValue;

    /**
     * 增值比例
     */
    @ApiModelProperty(value = "增值比例", required = true)
    @NotNull(message = "请输入增值比例！")
    @TypeMismatch(message = "增值比例格式有误！")
    @IsNumberPrecision(message = "增值比例最多允许2位小数！", value = 2)
    private BigDecimal added;

    /**
     * 使用条件
     */
    @ApiModelProperty(value = "使用条件", required = true)
    @NotNull(message = "请输入使用条件！")
    @TypeMismatch(message = "使用条件格式有误！")
    @IsNumberPrecision(message = "使用条件最多允许2位小数！", value = 2)
    private BigDecimal useCondition;

    /**
     * 售价
     */
    @ApiModelProperty(value = "售价", required = true)
    @NotNull(message = "请输入售价！")
    @TypeMismatch(message = "售价格式有误！")
    @IsNumberPrecision(message = "售价最多允许2位小数！", value = 2)
    private BigDecimal price;

    /**
     * 是否全部商品可用
     */
    @ApiModelProperty(value = "是否全部商品可用", required = true)
    @NotNull(message = "请输入是否全部商品可用！")
    @TypeMismatch(message = "是否全部商品可用格式有误！")
    private Boolean productAll;

    /**
     * 商品ID列表
     */
    @ApiModelProperty(value = "商品ID列表", required = true)
    private String productIds;

    /**
     * 是否全部门店可用
     */
    @ApiModelProperty(value = "是否全部门店可用", required = true)
    @NotNull(message = "请输入是否全部门店可用！")
    @TypeMismatch(message = "是否全部门店可用格式有误！")
    private Boolean stopAll;

    /**
     * 部门店ID列表
     */
    @ApiModelProperty(value = "部门店ID列表", required = true)
    private String shopIds;
}

